<?php

class Statements {
    
    public static function getMenus() {
        
        if($_SESSION['usuario']['nivel'] == '1') {

            $admin = "";

        } else {

            $admin = "AND Admin = 'I'";

        }

        $sql = "SELECT * FROM menu
                WHERE 1 = 1 
                AND Modulo = 'administracao'
                AND Situacao = 'A'
                {$admin}
                ORDER BY Descricao ASC";
        
        return Connection::getResult($sql);
        
    }
    
}

?>
